import React, { FC } from "react";
type PropsType = {
  title: string;
  desc?: string;
};

const QuestionInfo: FC<PropsType> = ({ title, desc='' }) => {
 //回车换行处理
  const descText = desc.split("\n")||'';
  return (
    <>
     <p style={{fontSize:'24px',textAlign:'center'}}>{title}</p>
     <p style={{textAlign:'center'}}> {descText&&descText.map((t, index) => (
          <span key={index}>{index > 0 && <br />}{t}</span>
        ))}</p>
    </>
  );
};
export default QuestionInfo;
